package cn.factorybox.item.mapper;

import cn.factorybox.model.entity.FactoryDevice;
import cn.factorybox.model.entity.FactoryDeviceData;
import cn.factorybox.model.entity.Room;

import java.util.List;
import java.util.Map;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-09-11 11:25
 */
public interface FactoryDeviceMapper {
    int save(FactoryDevice factoryDevice);

    int update(FactoryDevice factoryDevice);

    int delete(String id);

    List<Map<String, Object>> selectList(Integer number);

    List<Map<String, Object>> selectByNumber(int number);

    Double getSumRoom();

    Double getOver();

    Integer getDeviceNum();

    List<String> selectDeviceIds(String id);

    List<FactoryDevice> selectListByRoomId(String roomId);

    List<FactoryDevice> selectAllDevicesOfVersion3(String companyId);

    Map<String,Object> selectDeviceById(String id);

    List<Integer> countAll(String id);

    List<Integer> countNormal(String id);

    List<Integer> countWarning(String id);

    List<FactoryDevice> selectAllDevicesForHomePage(String companyId);

    FactoryDevice getFactoryDeviceById(String id);

    List<FactoryDevice> selectAllDevicesForRedisCache();

    List<String> selectValueList(String companyId);

    List<String> selectIdList(String companyId);

}
